/*
 * ContactableTree.java
 *
 * Created on 31 January 2004, 10:35
 * Copyright (C) 2004, Velocityme Partnership
 */

package com.velocityme.client.gui.node.contactable;

import javax.swing.tree.TreeModel;

/**
 *
 * @author  Robert Crida Work
 */
public class ContactableTree extends javax.swing.JPanel {
    
    private ContactableTreeCellRenderer m_cellRenderer;
    
    /** Creates new form ContactableTree */
    public ContactableTree() {
        m_cellRenderer = new ContactableTreeCellRenderer();
        initComponents();
    }
    
    public void setTreeModel(TreeModel p_treeModel) {
        jTree1.setModel(p_treeModel);
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    private void initComponents() {//GEN-BEGIN:initComponents
        jScrollPane1 = new javax.swing.JScrollPane();
        jTree1 = new javax.swing.JTree();
        jTree1.setCellRenderer(m_cellRenderer);

        setLayout(new java.awt.BorderLayout());

        jTree1.setRootVisible(false);
        jTree1.setShowsRootHandles(true);
        jScrollPane1.setViewportView(jTree1);

        add(jScrollPane1, java.awt.BorderLayout.CENTER);

    }//GEN-END:initComponents
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTree jTree1;
    // End of variables declaration//GEN-END:variables
    
}
